home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / e / misc.save / 000330_arthur.marsh@internode.on.net_Mon Mar 22 11:41:06 2010.msg < prev    next >
Internet Message Format  |  2020-01-01  |  5KB

  1. Path: reader1.panix.com!panix!usenet.stanford.edu!news.kjsl.com!news.alt.net!news.astraweb.com!border1.newsrouter.astraweb.com!not-for-mail
  2. Message-ID: <4BA76359.6090405@internode.on.net>
  3. Date: Mon, 22 Mar 2010 23:02:25 +1030
  4. From: Arthur Marsh <arthur.marsh@internode.on.net>
  5. User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20091109)
  6. MIME-Version: 1.0
  7. Newsgroups: comp.protocols.kermit.misc,gmane.linux.debian.user
  8. Followup-To: comp.protocols.kermit.misc
  9. To: Dotan Cohen <dotancohen@gmail.com>
  10. Subject: Re: Transferring files over SSH in the console
  11. References: <880dece01003211552le9d6018odb9bd683c3c897a9@mail.gmail.com>     <201003212314.32985.reidac@bellatlantic.net>     <201003212325.49742.reidac@bellatlantic.net> <880dece01003220152p3c8d50e1le80fe6bab5522601@mail.gmail.com>
  12. In-Reply-To: <880dece01003220152p3c8d50e1le80fe6bab5522601@mail.gmail.com>
  13. Content-Type: text/plain; charset=UTF-8; format=flowed
  14. Content-Transfer-Encoding: 7bit
  15. Lines: 119
  16. Organization: Unlimited download news at news.astraweb.com
  17. NNTP-Posting-Host: 42524105.news.astraweb.com
  18. X-Trace: DXC=l9bHn;8S3NG5\iVS6:P;:IL?0kYOcDh@J:_2G`<BJJVCT61>?HMHR[O[1L?Z<PkcbHUf\1e4^AmFF
  19. Xref: panix comp.protocols.kermit.misc:15932
  20.  
  21. Dotan Cohen wrote, on 2010-03-22 19:22:
  22. >>>   As others have commented, you can use scp or sftp.
  23. >>>
  24. >>>   However, I can imagine that embedded might not have the
  25. >>> sftp service or the scp executable.
  26. >>>
  27. >>>   If that's your case, you can always do:
  28. >>>
  29. >>> # cat file | ssh remote 'cat > destinaton'
  30. >>  Pardon my replying to myself, but I've now seen a bunch of the
  31. >> rest of the thread, and it seems to me that, if the set of commands
  32. >> you want to do is repeatable, then maybe what you want is to do
  33. >> most of the remote-system operations through SSH commands this way?
  34. >>
  35. >>  Someone else may have already suggested this, but something
  36. >> like:
  37. >>
  38. >> # cat file.tgz | ssh remote 'cat > dest.tgz' (or scp, if available)
  39. >> # ssh remote 'tar -xf dest.tgz'
  40. >> # ssh remote 'sh dest/installer' (or whatever)
  41. >> # ssh remote 'cat dest/install-log' > remote-install-log  (or whatever)
  42. >>
  43. >>  This way, you still only have the one shell, and/but you
  44. >> pay the price in having to prefix all the remote operations
  45. >> with "ssh remote".  However, you could script this on the
  46. >> local system (which is, I think, why you want a single
  47. >> session, right, so you can script it?), and then the extra
  48. >> typing doesn't really cost you much.
  49. >>
  50. > Thanks for the idea, Andrew, but I'm actually not scripting this.
  51. > Right now I have two windows open: one for sftp and one for shell
  52. > commands. I was hoping to save myself the trouble of switching
  53. > windows, keeping the cd in sync, etc, with something that supports
  54. > both sftp commands and ssh commands. I don't want to increase my
  55. > workload by prefixing all the commands.
  56.  
  57. I regularly use C-Kermit to do this kind of thing, but using telnetd-ssl 
  58. on the target machine rather than sshd.
  59.  
  60. Have a look at:
  61.  
  62. http://www.columbia.edu/kermit/ck90.html
  63.  
  64. To get a full range of features I download the source from the above 
  65. site and do a:
  66.  
  67. make linux+openssl+zlib+shadow+pam
  68.  
  69. followed by
  70.  
  71. checkinstall make install
  72.  
  73. on Debian. (You need packages for checkinstall openssl, openssl-dev, 
  74. zlib, but it builds easily)
  75.  
  76. An example of logging in to the remote machine, obtaining and building 
  77. C-Kermit on that machine, then using C-Kermit to download the source 
  78. tarball on that machine follows:
  79.  
  80. C-Kermit>telnet 192.168.1.101
  81.   Trying 192.168.1.101... (OK)
  82.   Negotiations........Authenticating with SSL
  83.  
  84. [TLS - AES256-SHA              SSLv3 Kx=RSA      Au=RSA  Enc=AES(256) 
  85. Mac=SHA1
  86. Compression: zlib compression
  87.   (OK)
  88. Password:
  89. Last login: Mon Mar 22 18:19:12 CST 2010 from 192.168.1.100 on pts/0
  90. Linux am64 2.6.32 #1 SMP PREEMPT Thu Mar 18 15:44:10 CST 2010 x86_64
  91.  
  92. amarsh04@remote:~/kermit-src$ kermit
  93. C-Kermit 9.0.299 Alpha.02, 1 Feb 2010, for Linux+SSL
  94.   Copyright (C) 1985, 2010,
  95.    Trustees of Columbia University in the City of New York.
  96. Type ? or HELP for help.
  97. (/home/amarsh04/kermit-src/) C-Kermit>ftp ftp.columbia.edu
  98. Connected to ftp.columbia.edu.
  99.   Name (ftp.columbia.edu:amarsh04): anonymous
  100.   Password:
  101. Login successful.
  102. Switching LOCUS for file-management commands to REMOTE (HELP LOCUS for 
  103. info).
  104. Remote system type is UNIX.
  105. Default transfer mode is BINARY
  106. (/home/amarsh04/kermit-src/) C-Kermit>cd kermit/test/tar
  107. Directory successfully changed.
  108. (/home/amarsh04/kermit-src/) C-Kermit>get x26.tar.gz
  109. (/home/amarsh04/kermit-src/) C-Kermit>q
  110. Goodbye.
  111. amarsh04@remote:~/kermit-src$ gzip -dc x26.tar.gz|tar -xvf /dev/fd/0
  112.  
  113. then edited the makefile to change prefix to /usr and manroot to 
  114. $(prefix)/share
  115.  
  116. then ran:
  117.  
  118. make linux+openssl+zlib+shadow+pam
  119. checkinstall make install
  120.  
  121. To move the x.26.tar.gz file to the local machine I ran:
  122.  
  123. amarsh04@remote:~/kermit-src$ kermit -s x26.tar.gz
  124. Return to your local Kermit and give a RECEIVE command.
  125.  
  126. KERMIT READY TO SEND...
  127.   SENT: [/home/amarsh04/kermit-src/x26.tar.gz] To: 
  128. [/home/amarsh04/kermit-src/x26.tar.gz] (OK)
  129.  
  130. C-Kermit does telnet client including with ssl and other 
  131. encryption/authentication options, SSH client using an external ssh 
  132. program, ftp client, and kermit client and server.
  133.  
  134. C-Kermit is worth a look at and an investment in some time learning how 
  135. to use it.
  136.  
  137. Arthur.